/**
 * Created by 1 on 2017/1/3.
 */
(function(){
    "use strict";
    function Score(){
        this.score=0;
        this.canvas=new Canvas("score",100,70);
        this._init();
    }
    Score.prototype={
        constructor:Score,
        _init:function(){
            this._render();
        },
        _render:function(){
            this.canvas.drawText(this.score);
        },
        addScore:function(value){
            this.score+=value;
            this._render();
            return this.score;
        }
    };
    window.Score=Score;
})();